import request from '@/utils/request'

// 查询考勤规则列表
export function listAttend_rule(query) {
  return request({
    url: '/ehr/attend_rule/list',
    method: 'get',
    params: query
  })
}

// 查询考勤规则详细
export function getAttend_rule(attendanceRuleId) {
  return request({
    url: '/ehr/attend_rule/' + attendanceRuleId,
    method: 'get'
  })
}

// 新增考勤规则
export function addAttend_rule(data) {
  return request({
    url: '/ehr/attend_rule',
    method: 'post',
    data: data
  })
}

// 修改考勤规则
export function updateAttend_rule(data) {
  return request({
    url: '/ehr/attend_rule',
    method: 'put',
    data: data
  })
}

// 删除考勤规则
export function delAttend_rule(attendanceRuleId) {
  return request({
    url: '/ehr/attend_rule/' + attendanceRuleId,
    method: 'delete'
  })
}
